import request from '@/utils/request'


export default {
    //学生列表 条件查询带分页
    getListPage(page,size,params){
        return request({
            url: `/cmsservice/students/pageStudents/${page}/${size}`,
            method: 'post', 
            params
          })
    },
    //根据id删除学生
    removeById(id) {
        return request({
        url: `/cmsservice/students/removeStudents/${id}`,
        method: 'post'
         })
    },
    //添加学生
    addInfo(data){
        return request({
            url: `/cmsservice/students/addStudents`,
            method: 'post',
            data
        })
    },
    //修改学生
    updateInfo(data){
        return request({
            url: `/cmsservice/students/updateStudents`,
            method: 'post',
            data          
        }) 
    },
    //id查询数据回显
    getInfoById(id){
        return request({
            url: `/cmsservice/students/getStudents/${id}`,
            method: 'get'          
        })
    },
    // 根据班级id 和学生姓名查询学生
    getStudentsName(params){
        return request({
            url: `/cmsservice/students/getStudentsName`,
            method: 'get',
            params        
        })
    },
    getStudentsId(idCard){
        return request({
            url: `/cmsservice/students/getStudentsId`,
            method: 'get',
            params:{
                idCard
            }      
        })
    }
}

